package my.diplom.dao.service;

import my.diplom.dao.IEventDAO;
import my.diplom.entity.Event;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: gb
 * Date: 14.07.2009
 * Time: 17:24:26
 * To change this template use File | Settings | File Templates.
 */
public class EventService {

    private IEventDAO eventDAO;

    public IEventDAO getEventDAO() {
        return eventDAO;
    }

    public void setEventDAO(IEventDAO eventDAO) {
        this.eventDAO = eventDAO;
    }

    public void create(Event event) {
        eventDAO.create(event);
    }

    public void update(Event event) {
        eventDAO.update(event);
    }

    public Event getById(Long eventId) {
        return eventDAO.getById(eventId);
    }

    public List<Event> getAll() {
        return eventDAO.getAll();
    }

    public void delete(Event event) {
        eventDAO.delete(event);
    }

    public List<Event> getEventsByLogin(String login) {
        return eventDAO.getEventsByLogin(login);
    }
}
